package servlet.zj;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dao.DAOFactory;
import dao.zj.BrandDao;
import entity.Brand;
import entity.Color;
import entity.Size;

/**
 * Servlet implementation class AddProductServlet
 */
@WebServlet("/AddProductServlet")
public class AddProductServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private BrandDao one=DAOFactory.createBrandDAO();
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		List<Brand> list=one.select();
		request.setAttribute("list", list);
		List<Color> color=one.color();
		request.setAttribute("color", color);
		List<Size> size=one.size();
		request.setAttribute("size", size);
		request.getRequestDispatcher("addproduct.jsp").forward(request, response);
	}

}
